CREATE OR REPLACE FUNCTION update_order_modified_date()
RETURNS TRIGGER
LANGUAGE plpgsql
AS $$
BEGIN
    NEW.last_modified_date := CURRENT_TIMESTAMP;
    RETURN NEW;
END;
$$;

CREATE TRIGGER trg_update_order_modified_date
BEFORE UPDATE
ON "order"
FOR EACH ROW
EXECUTE FUNCTION update_order_modified_date();
